{include file="public_head" /}

<!-- Select2 -->
<link href="__STATIC__/css/select/select2.min.css" rel="stylesheet">


<body class="nav-md">

<div class="container body">

    <div class="main_container">

        {include file="public_sidebar,public_nav" /}
        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">

                <div class="page-title">
                    <div class="title_left">
                        <h3>会员余额充值</h3>
                    </div>
                </div>
                <div class="clearfix"></div>
                <div class="row">
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>{$mate_title}</h2>
                                <ul class="nav navbar-right panel_toolbox">
                                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                    </li>
                                    <li><a class="close-link"><i class="fa fa-close"></i></a>
                                    </li>
                                </ul>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <br/>
                                <form class="form-horizontal form-label-left" action="" method="post" id="registerForm">

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">手机号：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input type="text" placeholder="请填写手机号"
                                                   class="form-control col-md-7 col-xs-12" name="username"
                                                   value="{$data.username|default=''}"
                                            >
                                        </div>
                                    </div>

                                    <div class=" divider-dashed">
                                    </div>


                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">账户余额：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input type="text"
                                                   class="form-control col-md-7 col-xs-12"
                                                   name="balance" value="{$data.balance}"
                                            >
                                        </div>
                                    </div>
                                    <div class="divider-dashed"></div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">充值金额：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input type="text"
                                                   class="form-control col-md-7 col-xs-12"
                                                   name="price" value=""
                                            >
                                        </div>
                                    </div>
                                    <div class="divider-dashed"></div>


                                    <div class="ln_solid"></div>

                                    <div class="form-group">
                                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                            {present name="$data.id"}
                                            <input type="hidden" name="id" value="{$data.id}">
                                            {/present}
                                            <button type="submit" class="btn btn-primary" id="sub_1">提交</button>
                                            <a type="reset" class="btn btn-success" onclick="history.go(-1)">返回</a>
                                        </div>
                                    </div>

                                </form>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
            <!-- /page content -->

        </div>

    </div>
</div>

{include file="public_foot" /}

<!-- Datatables-->
<script src="__STATIC__/js/datatables/jquery.dataTables.min.js"></script>
<script src="__STATIC__/js/datatables/dataTables.bootstrap.js"></script>
<!-- Times -->
<script src='__STATIC__/js/datepicker/WdatePicker.js'></script>
<!-- validform -->
<script src="__STATIC__/js/Validform_v5.3.2_min.js"></script>
<script src="__STATIC__/js/layer.js"></script>
<!--select-->
<script src="__STATIC__/js/select/select2.full.min.js"></script>
<script>
    $(function () {
        $('.layui-layer-title').innerHTML="收货地址";
    });
    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
    //validform
    $(function () {
        $.Tipmsg.r = null;
        $.Tipmsg.p = null;
        var demo = $('#registerForm').Validform({
            btnSubmit:'#sub_1',
            tipSweep: true,
            ajaxPost:true,
            callback:function(t){
                if (t.code == 200){
                    layer.msg('修改成功', {icon: 1});
                    parent.location.reload();
                    parent.layer.close(index);
                } else {
                    layer.msg('请填写金额', {icon: 1});
                }
            }
        })

        demo.config({
            url: "{:url('console/member/recharge')}"
        });

    })
</script>
</body>

</html>
